
<form name="gs_form">
<br><div align=right><a style="cursor:hand" onclick="javascript:gs_open('<%=form_page%>?method=insert');" ><img src=/images/bt1.gif></a> <span id=div1><img src=/images/bt5.gif></span> <span id=div2><img src=/images/bt6.gif></span> <span id=div3><img src=/images/bt_view.gif></span> <span><a style="cursor:hand" onclick="javascript:window.location.reload();"><img src=/images/bt10.gif></a></span></div>

<input type=hidden name=method>
<%


rs=handle.executeQuery(strsql);
	jsp.w("<table class='list' cellspacing=1>");
	jsp.w("<tr height=21>");
	jsp.w("<th ></th>");
	for(int i=0;i<headstr.length;i++)
	jsp.w("<th ><b>"+headstr[i]+"</b></th>");
	jsp.w("</tr>");
while (rs.next())
{
    	jsp.w( "<tr  style='cursor:hand' ondblclick=\"javascript:gs_open('"+form_page+"?method=update&"+col_id+"="+gs_cstr(rs.getString(col_id))+"')\" onclick=\"javascript:selectthis(this,'"+gs_cstr(rs.getString(col_id))+"');\">");
    	jsp.w( "<td><input  type=radio name='gid' value="+
    	gs_cstr(rs.getString(col_id))+"></td>");
    	for(int i=0;i<col_show.length;i++)
	jsp.w("<td>"+gs_cstr(rs.getString(col_show[i]))+"</td>");
    	jsp.w("</tr>");
}
	jsp.w("</table>");
%>
</form>
<script language=javascript>
	var obj_old;
	function selectthis(obj,gid1)
	{
		var obj1=obj;
		
		if(obj_old)	
		{
		obj_old.bgColor="#ffffff";
		}
		obj1.bgColor="#EBF278";
		
		obj_old=obj1;
		try
		{
			document.all.gid.checked=true;
				document.all["div1"].innerHTML="<a style=\"cursor:hand\" onclick=\"javascript:gs_open('<%=form_page%>?method=delete&<%=col_id%>="+gid1+"')\"><img src=/images/bt5.gif></a>";
				document.all["div2"].innerHTML="<a style=\"cursor:hand\" onclick=\"javascript:gs_open('<%=form_page%>?method=update&<%=col_id%>="+gid1+"')\"><img src=/images/bt6.gif></a>";
				document.all["div3"].innerHTML="<a style=\"cursor:hand\" onclick=\"javascript:gs_open('<%=form_page%>?method=select&<%=col_id%>="+gid1+"')\"><img src=/images/bt_view.gif></a>";

			}
		catch(E2)
		{}
		for(i=0;i<document.all.gid.length;i++)
		{
			if(document.all.gid[i].value==gid1)
			{
				document.all.gid[i].checked=true;
				document.all["div1"].innerHTML="<a style=\"cursor:hand\" onclick=\"javascript:gs_open('<%=form_page%>?method=delete&<%=col_id%>="+gid1+"')\"><img src=/images/bt5.gif></a>";
				document.all["div2"].innerHTML="<a style=\"cursor:hand\" onclick=\"javascript:gs_open('<%=form_page%>?method=update&<%=col_id%>="+gid1+"')\"><img src=/images/bt6.gif></a>";
				document.all["div3"].innerHTML="<a style=\"cursor:hand\" onclick=\"javascript:gs_open('<%=form_page%>?method=select&<%=col_id%>="+gid1+"')\"><img src=/images/bt_view.gif></a>";

				}
				else
					{
					document.all.gid[i].checked=false;	
						}
			}
		
		}
</script>
